<? if (!$this->skipFilter): ?>

<script>
  function filterResults()
  {
    $("#loader").show();

    $.ajax({
       url: "/browse/all",
       data: { just_data : 1, 'voucher' : $("#voucher").val(), 'country' : $("#country").val(), 'city' : $("#city").val(), 'zip' : $("#zip").val(), 'type' : $("#type").val(), 'mark' : $("#mark").val(), 'bank' : $("#bank").val() },
       success : function (data) {
    			$("#loader").hide();
					$("#filter-results").html(data);

					$(".add-to-cart").click( function () {
						_CART.add_remove_toggle( $(this).attr('vID') );
					});
					
					_CART.refresh( );
       }
		});
  }
</script>

<style>

.table_custom tr th{

text-align: center;

}

.table_custom tr td{

text-align: center;

}

</style>



  <fieldset>

    <legend>Search</legend>

<style>

input { width: 100px; }

.title { padding: 0px 10px; text-align: right; }

</style>

<div class="searchBox">

<table style='padding: 0px; margin: 0px;'>

<tr>



<td><input type='text' style='width: 150px' size="10" maxsize="20" name='voucher' id='voucher' placeholder="Please input Bin..."/></td>

<td>

<select name='country' id='country'>

<option value="">Select Country</option>

<? foreach($this->countries as $country): ?>

<? echo "<option value='{$country['card_country']}'>{$country['card_country']}</option>"; ?>

<? endforeach ?>

</select>

</td>

<td><input type='text' size="10" maxsize="20" name='city' id='city' placeholder="City..." autocomplete='off'/></td>

<td><input type='text' size="10" maxsize="20" name='zip' id='zip' placeholder="Zip..." autocomplete='off'/></td>

<td><input type='text' size="10" maxsize="20" name='type' id='type' placeholder="Type..." autocomplete='off'/></td>

<td><input type='text' size="10" maxsize="20" name='mark' id='mark' placeholder="Mark..." autocomplete='off'/></td>

<td><input type='text' size="10" maxsize="20" name='bank' id='bank' placeholder="Bank..." autocomplete='off'/></td>



<td>

<a href="#" class="btn btn-info btn-mini" style="margin-top: -10px; margin-left: 20px;" onclick='filterResults();'>Search <i class="icon-white icon-search"></i></a>

</td>

</tr>

</table>

</div>

</fieldset>

<br>

<div id="loader" style="position:absolute;margin-left:500px;margin-top:60px;display:none;">

  <img src="/img/ajax-loader.gif">

</div>

<div id="filter-results">

<? endif; ?>

  <table class="table table-striped table-condensed table-hover table_custom">

  <tr>

    <th>Bin</th>

    <th>Exp</th>

    <th>Name</th>

    <th>Coutry</th>

    <th>City</th>

    <th>Zip</th>

    <th>Type</th>

    <th>Mark</th>

		<th>Bank</th>

		<th>Price</th>



    <th style="width:00px;">Action</th>

  </tr>

  <? foreach ($this->valuationsListFiltered as $valuation): ?>

    <?= $this->partial('browse/simple-partial.phtml', array('valuation' => $valuation, 'skipImage' => true, 'hideVoucher' => true) ); ?>

  <? endforeach ?>

  </table>

<? if (!$this->skipFilter): ?>

</div>

<? endif; ?>

